<?php

namespace Common\Controller;
/**
 * Admin基础Controller
 */
class AdminController extends BaseController {
    public function _initialize(){
        //检查是否登录
        if(!in_array(CONTROLLER_NAME, array("Public")) && !is_login()){
            //redirect(url("public/login"));
        }
        C("DEFAULT_THEME", "default");
        C("DEFAULT_THEME_COLOR", "default_color");
        C("TMPL_PARSE_STRING", array(
            '__THEMES__' => '/public/admin/'.C("DEFAULT_THEME"),
            '__IMG__'    => '/public/admin/'.C("DEFAULT_THEME").'/images',
            '__CSS__'    => '/public/admin/'.C("DEFAULT_THEME").'/css',
            '__JS__'     => '/public/admin/'.C("DEFAULT_THEME").'/js',
        ));
        parent::_initialize();
    }
}